fix line overflow and failure to remove lock on signal bugs