Fixed ActiveDocument property.

After the user presses Ctrl + Tab keys to change active document, `ActiveDocument` property returns previous content.  This patch will fix the problem.