fix line wrapping problems
even better way of doing it