fixed missing cast found by Coverity CID 1232666
fixed missing cast found by Coverity CID 1232665
fixed missing cast found by Coverity CID 1232664