Bugfix, should take the MIN of MAXREALCORES and getNumProcessors