error validation improvments