Implements workaround for bug. Fixes #2288.
Implement basic selection mechanism. Fixes #2052.