Fix tags not saving in postgres

Also fixes bug where images can't be viewed in tags