Fix client crash after local service stop, change build script