clearing document array after saves