Make sure that the PCDM rc.d script actually runs the stop subroutine when it recieves the shutdown signal. Thia appears to fix all the shutdown detection issues.