Fixed resize problem