Updating plugin code to handle open all