fixing 'Document' case stuff (I hope.)