Fix of issue #12 and #7 Using a higher sample size will fix problems most likely.