Made correct validation