Fixes to various errors.