remove modal on hiding