Fixed initialize and shutdown