updated with latest error codes
fixed tiny bug