fixed segfault and prevent drops from other documents