Fixing the popup positioning