Fix purge script