Fix for when not calling modal hide with an event