contract changes and fixes