Update Middleman, fix some bugs.