Fix exception (undefined method 'content' for nil:NilClass).