Added code to detach method of MVPUI