fix for safari bug