Fix some bugs, bump to 1.0.1