Fixed bug where python function arguments overwrote