fix deletion update query