Fixed bug in bootstrapping