uninit bool and invalid iterator bugs fixes
Merge remote-tracking branch 'mrcheko/master'