fix for the critical error