Fix required fields logic