Added resize prevention