Better support on browser resize #3005