fixed some validation issues for layout form