resolved some code analysis issues (multi dispose on disposables)