security patch & typo refactoring