calling convention fixes