fixed a bug in the modal