Bugfix: the previous factor() doesn't work out correctly.