Fixed function redeclaration error