removed some bugs