Fixed crash when running the engine

Closes-Bug: #1223234
Change-Id: Iaed98ac1fb428b85e73718dbb2e79c6b9526059d