fixes to contract