fixed #1, exec factory after define.