Additions and bugfixes for behavior trees