fix condition when to run bootstrap