WIP: fix nil pointers in trigger controller