problem resolution
.modal(hide) instead of .hide()
conflict