Fixes and actual proper code for the parition status function