fix static analyzer warnings from engine commits 74cf1a6c39440ab8f15d91b8a584d3a35934fd2e and 4dcd4f1cba51c711f40d7284586275abd56a9fae