fixed custom modal,  delay bug