Fixed content-type register and added test.