Fixed various bugs

some hands are missing..
and added a retry logic for HTTPError