added bugfix for high seq number incorrect sign extension on java