changed ordering of error message to fire under most error conditions