Bug fix for back button / modals