Copied in tapmanager plugin