fixed possible bug in controller delete .