fixes #280
fix popup bug and deprecation