fix reader bug