Bug fixes for UI