fixes bug in mark selection