Fixed content-type and json messages issue.