fix delete guards, wrong prototypes (#1441)