Fixed bug in division process