I was able to duplicate the reported problem and have added an explicit variable declaration that should resolve the variable type mismatch (it did for me). Please try the new version, posted here, and let me know if it takes care of the error for you.
