On page resize fix