some fixes in validator