Fix bug found

Fix bug related to validate lines and square.