Fixed then in if statement

Change-Id: I10fc8bfde8e28985cb7fcbe745077b79cff1fb07