fix media loading from db