Modified onBootstrap method