further fixes to contract