thumbnail scaling fix