Working but slow and buggy async select queries