Recoded bootstrap to work correctly