improved StateError message