Fix a bug on removing cloud handlers.