Path effect scripting weird behavior when deleting from layer

I've been using path effects with scripting more often and I've noticed two behaviors:
1) When I keyframe an input of that script and later delete the script from the path, the keyframes are still present on the timeline

2) When I delete a script from a path by mistake and hit cmd + z the effect comes back but it is no longer responsive to changes I make on the inputs of that script. I need to delete it, add it again, and recreate the animations I had on those inputs again.