fix x87chaos alogorithm