Fix warning, enable tensor code