Fixed MEM allocation for SAMMY ROMS. and Frandom perm fix.