fixed bugs signalled by Coverity