main/quvi: fix memory corruption