fixed null pointer while shutting down - same problem exists in original corb