Fix missing content type and perf improvement for add site config.

Fixes #334.