various fixes to processing