fixed status update out of trigger