fix memory addressign in spiagent