fixed #202 smarter init order