fix for both CS and CS-EE mode