Make get/put more robust