Fixed yet another bug in selectContracts(int).