Fixed bitMax from returning 0 on 32bit values, changed interior loop to check if  [opcnt][element] is within bounds