Fixed content-type register and added test.

Same with this