fixed delete bug