Fix delete bug