fix issue with not pulling the error array correctly