fixed modalOpen() bug