Issue #57 : fix the conditional logic for list