Attemp 1: Fix queries bug