fixing navigation issue for cancel button