fixed a possible bug