deal with some bugs