minor fixes with contract creating and updating