Fixes:
Correct index for arguments and returns
Propper casting and types for X-args