Initialization bugs fixed