Included the case of logic function in the "else" case.
removed the XXX comment to report bug.