Fix contract creation