Fix 'divide by zero' bug which may lead to 'nan' outputs
Created by: efzfish
Bug fixed. All 'nan' values replaced by 0.
and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here
Created by: efzfish
Bug fixed. All 'nan' values replaced by 0.