set engine to NULL after releasing it