clean up some calling convention stuff