Bug fix in rdopt

Change-Id: Ieab80902755456e97583636f13d1417269b332b5