More trigger fixes and debug