fixed crash when popover is open and orientation is changed