fixed improper error length handling