Fixed a duplicated function