fixed width/height reisizing and compression bug