[Penlin] fix bug for slope = 0