fixed a division related bug