fixed bug: divide zero