Improvements on validation