Fix typo and align code with comment