Remove extra occurance of function