Fix duplicated function