Fixed bug in trace.sh script