fifo write needs fix