To make more identical to C++ implementation