fix memory like of client objects
fix bug where pending promises were getting serialized before they had ids set