You're not taking in consideration that "the free will" will have many outcomes(if someone did something now x will happen and if he did something else y will happen) and the omnipotent god can know every possible outcome so it's not a contradiction