Fix the function structure