Bug fixes for GUI