Prevents default on modal dispose