Fixes a spelling error and implements an optimization