Fixed a bug where the tempaddr was stored and retrieved with the wrong keys