clean up and fix filename issue