Added more client validity checks