Fixed crashes while opening some panels.