fixes #2
also added the fix for #1 to trace.php