bugfixes in calculation parallelization. running to see if its good