fix state migration