Fixed a Python3 bug in the screenshot feature