Fixed some bugs.

V0.9.1 Beta