Fixed userdata handling by addAccountExplicitly & updated example

From upstream master
Merged from upstream