Added handling of more exceptions in GUI.