div by 0 fix (backend)