fixes for popup positioning