fixed resize in gd