fixed notepad mode bug