Avoid corrupted/old text being visible in terminal