squares bug fix