Fixed missing else and double listing problems.