Fixng random gen in SPCA test codegen