Fixed ondestroy problem