rebased fix for trace decorator