fix applycontroller bugs