Fixed another bug with the database integration