patched the manage of userdata