Addresses part of issue #36: repeated calls of misc.init() and misc.shutdown() work for cuda