Fixed crash on validate in the engine.