Fix buffer underrun