fix #1276 - use registerLoadedCallback()
Merge pull request #1404 from owncloud/fixing-1276-master

fix #1276 - use registerLoadedCallback()