Fix when end above cursor