Modified random, not template. Fixed now