fixed registration (crashed due to user privileges)