added gearfreak's NAK limit fix