fixed NPE with engine and no debug.