Checked for symbols before calling destructors.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
Merge pull request #194 from ddobrev/master

Checked for symbols before calling destructors