weird divide by zero error fixed