Fix problems caused by plugin inconsistently passed as object.