Fix empty reading bug