medea project: fixed inactive/listen/active state switching (minor glitch)