fixed check validity