fixed defects found by coverity scan

I mean variable name `descriptor` is not clear. Perhaps it's not so important.
Everything else looks good for me.