fix for critical errors