Fix for simulate screenshot not working