Fix a divided by 0 error