Fix document exception