Finally fixed the "dangling else" problem!