fixed some trireaction bugs