understand the difference between end of queue and buffer underrun

also fix getting the position