more contract fixes