Don't hang on empty documents