Revert "fixed popup menu crashes."

This reverts commit da275db02baaa70c2bf933325d2070db70eead0a.