fix mediadb and gallery