Fixes for segment fault in ui monitor.