fixed dotshift for lines < 0