Fixing crash after multiple calls to init()