Fixed: undefined method debug for nil:NilClass