merged from kisskys/master_fix_abort_issue to master to fix issue 679