Made plugin work with local storage