Fixed name checking in validation