bug fix and removing traces