Fixing some minor bugs: FIFO-514, FIFO-487, FIFO-513, FIFO-512, FIFO-508