fix fetch_memory