rendering a dirty bit in the UI

fix #44
fix an NPE in the rendering code