Fix version requirement logic