Fix Safari bug