Fix possible corruption of params[0] across callback calls