fix crash when used with Theme.Dialog