More fixes to Documents controller