Minor bug when returning data for patched sqlite queries