hacky div by 0 protection