fix for right hand function declaration, for prototypical extension

Thanks to https://github.com/karelm