implemented https://github.com/globaleaks/GlobaLeaks/issues/740 and https://github.com/globaleaks/GlobaLeaks/issues/751