Fix failing tests in documents app