added a quick and dirty way to prevent the script from playing an already played gif