updated the chaining of deferreds
fixed an issue where winrt was throwing errors
adding missing semicolon