fixed #368: Smarter semantic selection