fixed a bug here