Fixed a typo ("whe" --> "when")