fret num bug fix and cleanup