fixed thumbnail generation so that it renders proper size