fixes to bagpipe-rest-attach and dataplane cleanup code