Fix content-type bug when serializing response