Fix popup location bug

Now only blocking thing is insert function. Rest everything else would
be additional things.