Minor fix to handle issue where result is null on cursor