minor code style tweak and undo test