Fix some more defects.

This is old code, copied from the .h file