Fixed bug on contract controller