Modified to correctly support Double in DynamicComposite