Fix issues with contract server