Added loss of focus for GUI elements when they're deleted.