fix some bungling