Fixed an issue with inserting data into the database.