Fix some high impact defects.
Merge pull request #567 from nomis52/master

Fix some high impact defects.