some fix for contract model