correct some bugs like divided zero