fixed traces bugs