Fixing edgemap bugs.