some improvements for popup looking up