fix close modal bug