added check for protected field  in userdata