More sensible behaviour on window size changes.