fix scope in contract.rb