Added error handling. Now flow scopes will be cleared if an error occurs.
Merge remote-tracking branch 'origin/master'