Fixed image resizing issues.