Fixing bug in ContratController