Fix overlay resize in some browsers