[CORE] Fix readq and writeq

Signed-off-by: Sukanto Ghosh <sukantoghosh@gmail.com>
Signed-off-by: Anup Patel <anup@brainfault.org>