Fix entity registration using the wrong classes.