Copied plugin from old fork.