fix errors object to populate correctly