Fix $LINES = $COLUMNS bug

Fixes #745