FIX: Error in javascript console

which said "destroy() is not a function".