Fix for mgmtclass pre trigger

Fix for exception caused during the removal of a mgmtclass
Merge pull request #544 from nickapal10/master

Fix for mgmtclass pre trigger