Fixed typo; added tests.