Added check on user_data length