fix bug not using where selection
docs