Fixed exception on curl fails