Fixing the wrong order of stack maintenance during function calling.