fix arrows up, down; fix computing lines info (bug with endWindow)