fix resource not a stream