Update specs and squash some bugs