Cleaner implementation of content type fix