Fixes incorrect entity registering