Fix for #916

Implemented a fix for screenshot saving. Fixes #916

Also it seems, that #749 was merged in 1.7 but not in 1.8. It is also included in this pull request.