cleanup and add temporary fix for duplication of results