fixed get error checking