Fixes code contract bugs.