Fixed math issues with the accuracy calculation and added default values if the "accuracy" block doesn't exist.