Adding a missing else condition