fixes buffer_scanner bug