Squashing some bugs