Fixed bug with close modal