Fixed duplicate function definition