Protection against negative values
Better text position in non-vertical obstacles