Fix range commit bug