fixed a very serious bug