When did Riga have cores in Prussia?