little optimization in master fifo