Fix NPE when no version can be selected.