bugfix calculate of columns and lines