fixed if else if issue in image