Add alias to imports when returning

addition to #2723 fixing issue #2642
Changed header case Content-type to Content-Type

fixes #2709 fixes #2726