fix removing of prototypes