A big fix to a few problems.