Fixed memory allocation problem with 10K templates, Adjusted bit
allocation to make more room for templateIds