Bug in adding squares