Modified plugin code.