closeOnESC added