added checks for stream set cursor