some tweaks to validation