fixed a part of a bug