fix userdata, todo registration fix