[Engine] Shutdown function no longer called twice.

Added stop function to the core.