fixing bug with validator modifying stale error message