fixed a few apparent errors