divide by zero bug fixed