Finally fixed a bug.