minor fixes on validation