fix up validation logic