fixed a bug in 1.2