Some necessary fixes.