Fixed bootstrap function