fixed scale, plus some other fixes