bugfix tempfile. Fixes #17