bug fixes and linelength filter