squashing a few bugs