removed safe_mode check