Fixed undefined behavior

bench: 8578729