Fixed NPE on history saving, minor fixes on admin ui.