Don't set the content type too early

sometimes we were setting the content type when there wasn't any
content.
Release 0.0.9