Bug fixed nas queries