Fix bad merge that undid some of dan's changes