fixed a small critical bug