Fixes shutdown error for Mangos