Fix put_object in tools.py