Fixing destroy problem. Addiitional functionality.