fix max cores