Fixed issue causing null errors to be reported