Changed something for better validation