fixed bug,
fifo was being incrimented incorrectly