Fix function return bug; fix windows arg space alloc bug