Fixed a bug use that guys rescaling code