Updated. Beta_0.4.

Fixed some bugs.