fixed __destruct function error