Remove duplicate code

Change-Id: Ib40fd2727e9058004b572b50005cdaa617e13981