eliminated some bugs