fixing trace error