Fix some build issues, Add an initialization stability check