Fix two bugs in autocorrect

The one in `AutocorrectAlignment#autocorrect` is pretty serious. It can destroy code.