Fix problem when specifying a component as a function.