Another thing I was trying to do is to break your code (since I can't fix mine I thought I could find the solution by breaking yours :) ). Strange thing that when I comment your line .CursorSchema I get error that this property is not set. Yet, in my code I don't set this property and I don't get an error.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham