Fixed a typo and move the logic inside OTJ submisson

Change-Id: I884f1cd68a29c7e078cede1f04af4b050e2e8af8