Addressed: sign extension issue found by Coverity #21