tweaking modal nav controller code for better responsiveness