removed unused imports & fixed apply_startup_params