Fixed resize condition and size