Fix Registration division by zero bug