Modified VAO code to work around winrt limitations