Updated. fixed a bug