encountered strange TypeError in testing, maybe be fixed by typing scale?