Fixed bug in divide method