I don't think your lcd.print(" "); is long enough to clear the entire line in case 1, try to make it longer and see if that works.
I don't think your lcd.print(" "); is long enough to clear the entire line in case 1, try to make it longer and see if that works.