fixed bugs in element view and global positioning