Fix #525 auto_resize behavior