Replaced == by equals when comparing Integers. Solves a bug that happen when more than 128 partitions are used