fix integer extraction