fixed a mysterious bug