fixed query for iphone