enabled js when model is destroyed