Nested conditions/ sub-conditions does not reset