I'm glad you are able to figure it out.
BTW: this is how I always start when I run into an issue in my own code. I compare to the samples and if it works there, I look for what's different.
Plus, if something doesn't work, I always assume I did something wrong until proven otherwise.