Fix stuck in mock mode bug