Fix errors related with #2.

Related with #2, there are still some errors.
I try to fix these errors. Please check it :)