fixed a bug at line 883