Fixed typo, simplified code.