fixed signed / unsigned comparison workaround