fixes to frame to work on rpi and line number