Fix #47: Negative terminal width causes crash