cleaned, bug fix for linescan init