Fix contract selection #683