bug fix for last line