some minor changes in validation