fix several delete/delete[] mismatches
Merge pull request #509 from ZappoMan/bug_fixes

fix several delete/delete[] mismatches