Fix some bugs

This PR is just for test.
Please check @ainoya. 
Thanks.