Fix some bugs and update cookbooks