fix BufferedStorageInputStream index bug