fixed closing modal dialogs without loaded animations