Repair bug

Fix issue #1.