correct state changes