fixed rpc and modal issues