fixed bug that caused result duplication