Updated to work with latest plex.