Fix undefined method destroy for nil:NilClass