Better cleanup for gen-pass

Signed-off-by: Mike Detwiler <mike.detwiler@gmail.com>