Updated SceneManager destroy function was not working properly
Added debug check
Lib engine