fixed falsely processing of errors