Fixed some bugs with the bootstrap code