bugfixes and first selection of lines