Make validation message munging a bit safer