prevent error where statuscode isn't defined