Fix popup positioning