Minor fixes to reduce errors