fixed bug, whih caused registering addons before preparing