Added support for tri-state logic.