better handling of final model (fixes #13)