Initialization bug fixes