Fix bytes-allocated bug