Bugfixes in the Popup class. Fixed warnings.