Fix layout bug for Safari