Fixing issues with getting data into the database.