fix bug about Registry.newObject

miss the 'cls'