fix trace method