add patch fixed-alignment-and-minor-code-cleanup