fix deletion js issues