Fix divide functionality