fix logic bug

Change-Id: I3290cf3a23fa5ec41388fea3df8770fcf2b388f4