Fixed bug when arguments of functon where in memory in wrong order