Fix #1 - state recording