1. correct bug for using 'motif_library'. 2. upper bound for ncores.