Fix deleteinplace