maybe class is registered too soon