fixed resize problem