Setting user data pointer properly