bugfix for empty selection, documentation