Chaged default to error code