Fix intermediate points bug