Fix issue that last curve is missing