fix bug where content type replacement didn't work