added check for width == 0 in wrap_line