small change on error handle