improved CustomNgnixControllerImpl