fixed bug where two core relied on ordering of input to be correct