added change to better generate thumbnail