bugfix error handle