spotted a difference from the C++ version on predict position logic