Fix transition and initialization problems