Make destroy work without javascript