Added else if support.