Function signature is most likely wrong

I'm not *completely* sure but it looks like the function signature is wrong and so is its implementation which helps write subtle bugs.