bug fixes in webapp/validator.coffee