fixed a bug in