Fixed the crash by unifying and registration of entities.