IssueID #31 : laveling algorithm bugfix