fix crash bug
add support (untested) for selecting