Fixes not being able to take screenshots in GUIs