added a hack for safari percentage bug