Merge changes I300ab05c,I0910b7db

* changes:
  Adds the concept of invalid bucket.
  Reset the base when pull fails.