Fix a little bug after test.

Fix a little bug after test. Now it works fine. Documentation will be
added later