module exit fixes