fixed line numeration in event handlers