removed some modal closing code