fix bug in libbehavior