Fixed sending trial data and preference data to the database