Moved the user_data check to initialize and fixed it's syntax.