Fix and improve backtraces