Fixed the duplicated function.