Fixed bug with Contracts