Fix compilation by moving stopRunning