Selection fix from #34 on master