1. corrected bugs
2. added error_msg_dialog