fix some problems introduced by my twiddling