fixed a bug where rescale wouldn't work