Fixed code to pull back data from database with new schema.