Minor bug fix  in engine initialization