fixed select and where