fixed rescale bug