fixed duplicate code

Change-Id: Idf2e864938ab55dfc6cb5f4a4f25c27352944c5d