fix #1276 - use registerLoadedCallback()

closes #1276

Reviewers please @MTGap @blizzz @butonic @karlitschek @bartv2 

THX