fix issue #977

fix issue #977
You will also need to add the `@JsonCreator` annotation to the constructor itself.