Made popup position more precisely