Fixed some issues with validation

Change-Id: Iea22e13c947adae898160088e05598a1b7018dd0