Added a condition to avoid adding zero