Fix typing of division function