Fix statelog stuff.