fixed formatting issues to support screenshot.py