modal closing bug fixed