Fix layout bug on Safari