correct bug where `can-undo` returned true even whithout a previous state available