Fix document storage