Fixed bug in the active(O) predicate