Fix modal not appearing after hiding