fixed filtering of empty lines