qio: Fix minor bugs