Fix for image scaling in thumbnail display.