Attempt fix for db.char index nil error