fix bug in destroy method that would keep the original element hidden. fixes #815