Added condition for else.