FIX: minor bugs in the handling of data selections