fix issue 345
allow overriding deafult options for pop-over
fix some syntax errors