minor fixes in UI js