addresses some bugs