better dirty checking on validation