__destruct bugfix