Solved bug in stats.boot function