fixed beginning-of-line bug