Fixed priorities. Fixed precondition on generation of selfguards.