Fixing passing stack parameters to internal methods, reseting refcount to static variables (2)