BUG/FIX: fix dtype issue when querying