fixed some validation