update script to allow for safari compatibility