Issue #142: fix popover bug (thanks @martinbuezas)