adapt to new loader api.