improve maxdpr plugin