Made plugin work with the latest version