bug fix in square and complite