Fixed typo causing buggy code.