bugfix in goto_document