Several small fixes

Fix for assertion in UndoListView when undo stack is empty.
Fixes of some compilation warnings reported by Clang.