fix check for opts[:data]