Bump version to 1.2.2. Fixed bug with registering types in the serializer