Two small bugfixes.

1. Fixed accepting ClassConfig as json.
2. Fixed reindex on afterwrite.