Fixed some issues.

Close #4
Close #5