add workaround for safari bug