Merge pull request #1393 from sjinks/1.2.4

[1.2.4] Fix bugs found by static code analyzers