Fix #231: fix crashing when selecting things