Two small fixes which came up in the context of state restore

Merged Adam Reichold requested to merge fixes into main

Merge request reports