Checks for actual factors

Note, I can't test because the program doesn't compile on Linux (or Windows for that matter.) I sure hope that admin accepts that bug fix.