better extension handling in reflection module.