fix for empty selection
fix for illegal marker