Fixes update document validity check.