bugfix: stats->bytes_in should be reset