fixed cyclic call stack when initializing without an ID (issue #228)