move with_model cleanup code to finally block
Merge pull request #94 from jmuhlich/with_model

move with_model cleanup code to finally block