Need to figure out why some of this database stuff isn't working