#replace needs @flashes to already be set