allowed_selects not done correctly