Fix for UI bugs