fixing BIO buffer fetching