Added calling the dereferencing method on disposing of controller.