fix incorrect popup positioning