Added more cleanup after modal show.