Fixed wrong variable when generating thumbnails using image_resize().