Bug fix in else case

Found a bug in the else case