fixing PFSS/CSGS bugs